package com.example;
import com.example.mapper.EmpMapper;
import com.example.service.flowable.ILeaveService;
import org.flowable.engine.*;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * 本地数据库
 * @author wsl
 */
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class FlowableDb {

    @Autowired
    protected RepositoryService repositoryService;

    @Autowired
    protected RuntimeService runtimeService;

    @Autowired
    protected HistoryService historyService;

    @Autowired
    protected TaskService taskService;

    protected String processDefinitionId;

    public FlowableDb(String processDefinitionId){
        this.processDefinitionId = processDefinitionId;
    }

    protected String leaveProcessDefinitionId = "Leave:1:f4862d52-e0b1-11ec-98ae-00ff37603673";

    protected String listeningDefinitionId = "listening:1:0386ecd0-e214-11ec-81ee-00ff37603673";

    protected String candidateDefinitionId = "CandidateGroup:1:2f573d74-e220-11ec-909f-00ff37603673";

    protected String exclusiveDefinitionId = "ExclusiveGateway:1:d0c32a9e-e238-11ec-85ba-00ff37603673";

    @Autowired
    protected ILeaveService leaveService;

    @Autowired
    protected EmpMapper empMapper;

    @Autowired
    protected IdentityService identityService;


    @Test
    public void t() {
        empMapper.selectById("11");
    }
}
